package com.simtop.dao;

import com.simtop.pojo.User;
import com.simtop.pojo.wddata.*;
import com.simtop.pojo.wddata.UserVo;
import com.simtop.vo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.python.antlr.op.In;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Mapper
public interface ApiMapper {


    void saverapi(@Param("allvalue") String data, @Param("createtime") String createtime,@Param("plant") String plant);

    api findAlldevice();

    boolean savedata(List<WdDate> lastDate);

    List<MainTain> findAlldeviceList(@Param("op")String op , @Param("px") String px,@Param("deviceName")String deviceName, @Param("deviceType")String deviceType);

    WdDate findDeviceValue(@Param("deviceId") int deviceId,@Param("testType") String testType);


    WdDate findDeviceStatusValue(@Param("deviceId") int deviceId);


    void updateDevice(@Param("deviceId")Integer deviceId , @Param("devicepolicelistOne") String devicepolicelistOne,
                      @Param("devicepolicelistTwo") String devicepolicelistTwo,
                      @Param("devicepolicelistThree") String devicepolicelistThree,
                      @Param("devicepolicelistFor") String devicepolicelistFor,
                      @Param("testLocation") String testLocation, @Param("deviceNormalup") Integer deviceNormalup, @Param("deviceNormaldown") Integer deviceNormaldown,
                      @Param("devicePoliceup") Integer devicePoliceup,
                      @Param("devicePolicedown")Integer devicePolicedown,
                      @Param("testType")String testType);

    List<MainTain> findAlldeviceListAll();


    void updateDeviceList(@Param("findAlldeviceListAll") List<MainTain> findAlldeviceListAll);

    void updateDeviceDataList(@Param("monitoringDataVos") ArrayList<MonitoringDataVo> monitoringDataVos);

    List<MonitoringDataVo> findAlldeviceMonitor(@Param("op") String op,@Param("px") String px);

    List<MonitoringDataVo> findAlldeviceListAllBystatus(@Param("op") String op, @Param("px") String px,
                                                        @Param("readTimeBegins") String readTimeBegins,
                                                        @Param("readTimeEnds") String readTimeEnds,
                                                        @Param("deviceNumber") String deviceNumber,
                                                        @Param("testType") String testType);

    List<MonitoringDataVo> findAlldeviceListAllBystatus2();


    void updeviceStatus(@Param("policeControl") Integer policeControl,@Param("testType") String testType, @Param("deviceId") Integer deviceId);

    String finNewDevice();

    MainTain findBynameAndidAndType(@Param("id") Integer i);

    void insertGroupBy(@Param("groupName") String groupName, @Param("i") int i, @Param("deviceName") String deviceName, @Param("deviceId") Integer deviceId,
                       @Param("testType") String testType,@Param("findOneTypeId") int findOneTypeId);

    List<GroupUp> finAllGroupUp(@Param("groupId") String groupId);

    void insertGroupType(String groupName);

    void insertGroupType1(String groupName);

    int findOneTypeId(@Param("groupName") String groupName);

    int findOneTypeId1(@Param("groupName") String groupName);

    int finOnly(@Param("groupName") String groupName);

    List<GroupType> groupType();

    List<OnlyType> findAlldeviceListAll2();

    List<String> findAllTab(@Param("id") int id);

    List<String> finAllU3dTab();

    void updateAllGroupName(@Param("groupName") String groupName,@Param("groupid") int groupid);

    void updateAllGroupName1(@Param("groupName") String groupName,@Param("groupid") int groupid);

    void updateAllgoup(@Param("groupName") String groupName ,@Param("groupid") Integer groupid);

    void updateAllgoup1(@Param("groupName") String groupName ,@Param("groupid") Integer groupid);

    List<GroupType> groupTypeUser();

    int finOnly1(@Param("groupName") String groupName);

    List<Integer> finByid(@Param("id") Integer id);

    UserVo findOne(@Param("id")Integer i);

    void insertGroupBy1(@Param("i") Integer i,@Param("name") String name, @Param("rolename") String rolename,@Param("findOneTypeId") int findOneTypeId);

    List<GroupUserTypes> finAllGroupUp2(@Param("groupId") String groupId);

    void deleteGroup(@Param("groupid") Integer groupid);

    void deleteGroup1(@Param("groupid") Integer groupid);

    List<wduserGroupBy> findAllGroupByid();

    List<wduserGroupBy> findAllGroupByid2();

    wduserGroupByDao finOnewdGroupById(@Param("id") Integer id);

    List<User> findAllUser(@Param("groupChead") String groupChead);

    void updateAllgroupByid(@Param("types") String types,@Param("id") Integer id,@Param("name") String name);

    String findOneGroupByOne(@Param("id") Integer id);

    String findOneGroupByOne2(@Param("id") Integer id);

    void cheageUser(@Param("groupchead") String groupchead,@Param("name") String name);

    void cheageUser2(@Param("groupchead") String groupchead,@Param("name") String name);

    void deletOne(@Param("id") Integer id,@Param("type") String type);

    void updateBackendUser(User user);

    void insertGroupbubu(@Param("types") String types, @Param("name") String name);

    List<MainTain> findAlldeviceList2(@Param("deviceName") String deviceName,@Param("deviceType") String deviceType);

    List<MonitoringDataVo> findAlldeviceListAllBystatus3(@Param("sqsyidlist") ArrayList<Integer> sqsyidlist);

    void getStatus(@Param("id") Integer id);

    void getStatusList(@Param("sqsyidlist") ArrayList<Integer> sqsyidlist);

    void getStatusList2(@Param("sqsyidlist") ArrayList<Integer> sqsyidlist);

    void safeData(@Param("status") Integer status);

    allTypeVo getsafeData();

    void massageStatus(@Param("cont") String cont,@Param("status") Integer status);

    StatusVo getmassageStatus();

    messageVo getmassageStatus2();

    int lastGroup(@Param("ids") Integer ids);

    String findRoleName(@Param("roleId") Integer roleId);

    List<String> findwdList(@Param("vs") String vs);


    List<String> findwdList2(@Param("formatBegin") String  formatBegin , @Param("formatEnd") String formatEnd);

    List<MainTain> findAlldeviceListAllnew(@Param("devicetype") String devicetype);

    Integer findvalue(@Param("as2") String as2, @Param("deviceNumber") String deviceNumber);

    List<String> findviewData();

    void yjController(@Param("yjControl") Integer yjControl,
                      @Param("testType") String testType,
                      @Param("deviceId") Integer deviceId);

    void changemaintime(@Param("deviceId") Integer deviceId,
                        @Param("mainTime") Date mainTime);

    void timeCount(@Param("timeCount") Integer timeCount);

    Integer finOneTimeCount();

    ApiVo finnewData();

    Integer findTtimeCount();

    List<String> sixday();

    List<String> findSixDay(@Param("vbs") String vbs);

    List<String> findSixDay2(@Param("vbs") String vbs);
}
